package com.dwm716.shorturl.utils;

/**
 * Created by wilson on 2025/1/30.
 */
public class UrlUtil {

    private static String addKey = "shortUrlKeyHHHHHHH";

    public static String appendKey(String url) {
        return url + "&" + addKey + "=" + System.currentTimeMillis();
    }

    public static String subKey(String url) {
        int i = url.indexOf("&" + addKey);
        if ( i >= 0) {
            return url.substring(0, i);
        }
        return url;
    }

}
